package com.xingfly.repository;

import com.xingfly.model.Role;
import com.xingfly.model.User;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * Created by SuperS on 2016/11/29.
 */
public interface UserRepository extends JpaRepository<User, Long> {
    User findUserByUsername(String username);

    User findUserByMail(String email);

    List<Role> findRolesByUsername(String username);

    User findUserByPhone(String phone);
}
